import Vue from "vue";
import App from "./App.vue";
import { Input, Pagination, Table, ConfigProvider, Spin } from "ant-design-vue";

import "@/assets/reset.scss";
import "viewerjs/dist/viewer.css";
import VueViewer from "v-viewer";
import store from "./store/index";
import getJson from "@/util/getJson";
import "@/assets/styles/chat/index.scss";
import "@/assets/scrollbar.scss";
import JSONText from "@/components/DevTool/JSONText.vue";
import ImagePreview from "@/components/ImagePreview/index.vue";
import initDirective from "@/directive";

initDirective(Vue);
Vue.config.productionTip = false;
Vue.config.silent = true;
Vue.config.strict = true;
Vue.prototype.$getJson = getJson;

Vue.prototype.$t = function (key, params) {
  return this.$store.getters["language/t"](key, params);
};
Vue.component("JSONText", JSONText);
Vue.component("ImagePreview", ImagePreview);
Vue.use(Input);
Vue.use(Pagination);
Vue.use(Table);
Vue.use(ConfigProvider);
Vue.use(Spin);
Vue.use(VueViewer);

new Vue({
  render: (h) => h(App),
  store,
}).$mount("#app");
